package com.sp.scmdb.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Type;
import org.joda.time.DateTime;

import com.sp.scmdb.common.DomainObject;

@Entity
@Table(name = "OBJ_READERS")
public class LabelReadingMachine extends DomainObject {

	@Column(name = "lrmID")
	private int lrmID;

	@Column(name = "lrmName", nullable = false)
	private String lrmName;

	@Column(name = "lrmType", nullable = false)
	private int lrmType;

	@Column(name = "lrmX", nullable = false)
	private int lrmX;

	@Column(name = "lrmY", nullable = false)
	private int lrmY;

	@Column(name = "lrmState", nullable = false)
	private int lrmState;

	@Column(name = "lrmTime")
	@Type(type = "org.joda.time.contrib.hibernate.PersistentDateTime")
	private DateTime lrmTime;

	@Column(name = "rmk")
	private String rmk;
	
	@Column(name = "mapID")
	private int mapID;
	
	@Column(name = "lrmRadius")
	private int lrmRadius;
	
	@Column(name = "monitorDaySecurity", nullable = false)
	private boolean monitorDaySecurity;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "securityTrainingId", insertable = true, updatable = true)
	@NotFound(action = NotFoundAction.IGNORE)
	private SecurityTraining securityTraining;
	@Column(name = "dangerousMans")
	private String dangerousMans;
	@Column(name = "previousReaders")
	private String previousReaders;
	@Column(name = "behindReaders")
	private String behindReaders;
	@Column(name = "oftenHoursSendSMS")
	private float oftenHoursSendSMS;
	
	public DateTime getLrmTime() {
		return lrmTime;
	}

	public void setLrmTime(DateTime lrmTime) {
		this.lrmTime = lrmTime;
	}

	public String getRmk() {
		return rmk;
	}

	public void setRmk(String rmk) {
		this.rmk = rmk;
	}

	public int getLrmID() {
		return lrmID;
	}

	public void setLrmID(int lrmID) {
		this.lrmID = lrmID;
	}

	public String getLrmName() {
		return lrmName;
	}

	public void setLrmName(String lrmName) {
		this.lrmName = lrmName;
	}

	public int getLrmType() {
		return lrmType;
	}

	public void setLrmType(int lrmType) {
		this.lrmType = lrmType;
	}

	public int getLrmX() {
		return lrmX;
	}

	public void setLrmX(int lrmX) {
		this.lrmX = lrmX;
	}

	public int getLrmY() {
		return lrmY;
	}

	public void setLrmY(int lrmY) {
		this.lrmY = lrmY;
	}

	public int getLrmState() {
		return lrmState;
	}

	public void setLrmState(int lrmState) {
		this.lrmState = lrmState;
	}

	public void setMapID(int mapID) {
		this.mapID = mapID;
	}

	public int getMapID() {
		return mapID;
	}

	public void setLrmRadius(int lrmRadius) {
		this.lrmRadius = lrmRadius;
	}

	public int getLrmRadius() {
		return lrmRadius;
	}
	
	public boolean getMonitorDaySecurity() {
		return monitorDaySecurity;
	}

	public void setMonitorDaySecurity(boolean monitorDaySecurity) {
		this.monitorDaySecurity = monitorDaySecurity;
	}
	public SecurityTraining getSecurityTraining() {
		return securityTraining;
	}
	public void setSecurityTraining(SecurityTraining securityTraining) {
		this.securityTraining = securityTraining;
	}
	public String getDangerousMans() {
		return dangerousMans;
	}
	public void setDangerousMans(String dangerousMans) {
		this.dangerousMans = dangerousMans;
	}
	public String getPreviousReaders() {
		return previousReaders;
	}
	public void setPreviousReaders(String previousReaders) {
		this.previousReaders = previousReaders;
	}
	public String getBehindReaders() {
		return behindReaders;
	}
	public void setBehindReaders(String behindReaders) {
		this.behindReaders = behindReaders;
	}

	public float getOftenHoursSendSMS() {
		return oftenHoursSendSMS;
	}

	public void setOftenHoursSendSMS(float oftenHoursSendSMS) {
		this.oftenHoursSendSMS = oftenHoursSendSMS;
	}
}
